from utils.process_attrs_Loc import *

def main():
    # # 应急专家  属性和文件初始化
    # cmdb_type = "EMERGENCY_EXPERT"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyExpertMgr/emergencyExpertAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyExpertMgr/expert.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # # process_attributes_loc(attrs_py, loc_py)

    # # 应急专家  手动调整emergencyExpertAttrs.py的必填和非必填，更新loc文件
    # process_attributes_loc(attrs_py, loc_py)

    # # 特殊作业-风险辨识管理  自定义属性文件或查询mysql数据库表结构生成属性文件，生成loc文件
    # mysql_database = "hgyq_special_work"
    # mysql_table = "sw_m_knowledge_work_hazard"
    # attrs_py = "./locators/specialWork/workDataMgr/workKnowledgeBase/riskIdentificationMgr/riskIdentifyAttrs.py"
    # loc_py = "./locators/specialWork/workDataMgr/workKnowledgeBase/riskIdentificationMgr/risk.py"
    # process_mysql_data(mysql_database, mysql_table, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)


    # # 应急队伍
    # cmdb_type = "EMERGENCY_TEAM"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyTeamMgr/emergencyTeamAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyTeamMgr/team.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)

    # # 应急物资
    # cmdb_type = "EMERGENCY_GOODS"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyGoodsMgr/emergencGoodsAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyGoodsMgr/goods.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)
    #
    # # 应急装备
    # cmdb_type = "EMERGENCY_EQUIP"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyEquipMgr/emergencEquipAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyEquipMgr/equip.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)
    #
    # # 避难场所
    # cmdb_type = "EMERGENCY_SHELTER"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyShelterMgr/emergencShelterAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyShelterMgr/shelter.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)
    #
    # # 医疗机构
    # cmdb_type = "EMERGENCY_HOSPITAL"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyHospitalMgr/emergencyHospitalAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyHospitalMgr/hospital.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)
    #
    # # 重点防护目标
    # cmdb_type = "EMERGENCY_KEY_PROTECTION_TARGETS"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/keyProtectionTargetMgr/keyTargetAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/keyProtectionTargetMgr/key.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)
    #
    # # 社会救援力量
    # cmdb_type = "EMERGENCY_SOCIAL_RELIEF_FORCE"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/socialRescueForceMgr/socialRescueAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/socialRescueForceMgr/social.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)
    #
    # # 应急车辆
    # cmdb_type = "EMERGENCY_CAR"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyCarMgr/emergencyCarAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/emergencyCarMgr/car.py"
    # # process_cmdb_data(cmdb_type, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)

    # # 应急资源管理-配置管局-单位布局管理
    # mysql_database = "hgyq_agile_emergency"
    # mysql_table = "con_m_unit_layout_config"
    # attrs_py = "./locators/agileEmergency/emergencyResourceMgr/unitLayoutConfig/unitLayoutAttrs.py"
    # loc_py = "./locators/agileEmergency/emergencyResourceMgr/unitLayoutConfig/layout.py"
    # process_mysql_data(mysql_database, mysql_table, attrs_py)
    # process_attributes_loc(attrs_py, loc_py)

    # 应急预案业务端-预案文本管理
    mysql_database = "hgyq_emergency_plan"
    mysql_table = "t_plan_text"
    attrs_py = "./locators/agileEmergency/emergencyPlanMgr/planTextMgr/planTextAttrs.py"
    loc_py = "./locators/agileEmergency/emergencyPlanMgr/planTextMgr/planText.py"
    process_mysql_data(mysql_database, mysql_table, attrs_py)
    process_attributes_loc(attrs_py, loc_py)

if __name__ == "__main__":
    main()